home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 2 / ETO Development Tools 2.iso / Tools - Objects / MacApp / MacApp CD Release / MacApp® 2.0.1 Tutorial / Chapter 03 / IconEdit.p
Encoding:
Text File  |  1990-10-25  |  1.0 KB  |  56 lines  |  [TEXT/MPS ]

  1. {IconEdit.p}
  2. {copyright © 1989 by Apple Computer, Inc.  All rights reserved.}
  3.  
  4. PROGRAM IconEdit;
  5.  
  6. USES
  7.     UMacApp;
  8.  
  9.  
  10. CONST kFileType = 'IDOC';
  11.       kSignature = 'ICED';
  12.  
  13.  
  14.  
  15. { Type definitions }
  16.  
  17. TYPE 
  18.     TIconApplication = OBJECT(TApplication)
  19.  
  20.         PROCEDURE TIconApplication.IIconApplication(iconFileType: OSType);
  21.             {Initializes the application and globals.}
  22.  
  23.     END;
  24.  
  25.  
  26.  
  27. { Method definitions }
  28.  
  29. PROCEDURE TIconApplication.IIconApplication(iconFileType: OSType);
  30.  
  31. BEGIN
  32.     IApplication(iconFileType);
  33. END;
  34.  
  35.  
  36.  
  37. { Global variables }
  38.  
  39. VAR
  40.     gIconApplication: TIconApplication;
  41.  
  42.  
  43.  
  44. { the main routine }
  45.  
  46. BEGIN
  47.     InitToolBox;                    { Essential toolbox and utilities initialization }
  48.     InitUMacApp(8);                    { Initialize MacApp with 8 calls to MoreMasters. }
  49.  
  50.     New(gIconApplication);            { Create a new TIconEditApplication object.      }
  51.     FailNIL(gIconApplication);        { Make sure New didn't fail.                     }
  52.     gIconApplication.IIconApplication(kFileType);  { Initialize the new object.      }
  53.  
  54.     gIconApplication.Run;            { Run the application.  When it's done, exit.    }
  55. END.
  56.